package com.hivelog.ponto.domain;

import java.util.Collection;
import java.util.HashMap;

public class PontoMes {
	
	private String mes;
	
	private HashMap<String, Colaborador> map;
	
	public PontoMes(String mes){
		this.mes = mes;
		map = new HashMap<String, Colaborador>();
	}
	
	public Colaborador getOrCreateColaborador(String eMail){
		
		Colaborador c = null;
		if (map.containsKey(eMail)) {
			c = map.get(eMail);
		} else {
			c = new Colaborador(eMail); 
			map.put(eMail, c);
		}
		
		return c;
		
	}

	public HashMap<String, Colaborador> getMapMes() {
		return map;
	}
	
	public Collection<Colaborador> getColaboradores(){
		return map.values();
	}

	public String getMes() {
		return mes;
	}

	public void setMes(String mes) {
		this.mes = mes;
	}

}
